package com.tkk.monitoring.filter;

import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.HttpRequest;
import org.littleshoot.proxy.HttpFilters;
import org.littleshoot.proxy.HttpFiltersSource;

/**
 * author: Tkk
 * date: 2015/7/7
 */
public class Filter implements HttpFiltersSource {

    @Override
    public HttpFilters filterRequest(HttpRequest httpRequest, ChannelHandlerContext channelHandlerContext) {
        return new FilterChain(httpRequest, channelHandlerContext);
    }

    @Override
    public int getMaximumRequestBufferSizeInBytes() {
        return 1024 * 1024 * 100;
    }

    @Override
    public int getMaximumResponseBufferSizeInBytes() {
        return 0;
    }
}
